treeview: Add an explicit return for clarity
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2015 22:41:14 +0000 (18:41 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2015 22:41:14 +0000 (18:41 -0400)
I believe that first_column can only ever be NULL here if
last_column is NULL too, in which case we'd exited already.
But coverity doesn't see that, so add an explicit exit.

gtk/gtktreeview.c

index eb77cd13cd42888be04d3e62337a2d6231dc9c2b..05ddece53b6030b48012c22abbefd564dcaf5db5 100644 (file)
@@ -2687,6 +2687,9 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget,
        first_column = first_column->next)
     ;
 
+  if (first_column == NULL)
+    return;
+
   rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
 
   /* find out how many extra space and expandable columns we have */